import request from '@/utils/request'
// 获取班级信息列表
export const gitClassInfoListApi = (params) => {
    return request({
        url: "admin/class/class",
        method: 'GET',
        params,
    })

}

// 获取下拉菜单信息
export const getSubjectListApi = () => {
    return request({
        url: "admin/subject/tree",
        method:"GET",
    
    })
}

// 添加
export const addClassAPi = (data) => {
    return request({
        url: 'admin/class/class',
        method: "POST",
        data,
    
    })

}
// 获取详情
export const getClassInfo = (id) => {
    return request({
        url: "/admin/class/class/" + id,
        method:'GET'
    })
}
// 修改
export const editClassApi = (data) => {
    return request({
        url: "admin/class/class/" + data.id,
        method:"PUT",
        data,
    })
}
// 删除
export const delClassApi = (id) => {
    return request({
        url: '/admin/class/class/' + id,
        method:"DELETE"
    })
}
// 获取老师信息
export const getTeacherList = (params) => {
    return request({
        url: "admin/class/teacher",
        method: "GET",
        params,
    
    })

}
// 状态改变
export const ChangeState = (data) => {
    return request({
        url: 'admin/class/class/' + data.id,
        method: 'PUT',
        data,
    
    })

}
